<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>

    <script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
    <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

    <script type="text/babel">
      class App extends React.Component {
        constructor() {
          super()
          this.state = {
            message: 'Hello World',
            movies: ['大话西游', '凡人修仙转', '超凡英雄', '蜘蛛侠3']
          }
        }

        OriginRender() {
          return (
            <div>
              <h2>{this.state.message}</h2>
              <div>电影列表</div>
              <ul>
                <li>电影1</li>
                <li>电影2</li>
                <li>电影3</li>
                <li>电影4</li>
                <li>电影5</li>
              </ul>
            </div>
          )
        }

        render() {
          return (
            <div>
              <h2>{this.state.message}</h2>
              <ul>
                {this.state.movies.map((e) => (
                  <li key={e}>{e}</li>
                ))}
              </ul>
            </div>
          )
        }
      }

      ReactDOM.render(<App />, document.querySelector('#app'))
    </script>
  </body>
</html>
